window.List = require("List");
window.dictionary = require("dictionary");

//  var manager= cc.director.getCollisionManager();
//  manager.enabled = true;


var EventBus = require("EventBus");
var Constant = require("Constant");
var UIManager = require("UIManager");
var ResourceManager = require("ResourceManager");
var LayerManager = require("LayerManager");
var ViewManager = require("ViewManager");
var BaseWind = require("BaseWind");
var WxServer = require("WxServer");

var StageCfgData = require("StageCfgData");
var LandCfgData = require("LandCfgData");

var GameConstant = require("GameConstant");
var GameViewData = require("GameViewData");
var TokenFactory = require("TokenFactory");
var TokenManager = require("TokenManager");
var StageManager = require("StageManager");
var StaticFunc = require("StaticFunc");

var GameEnum = require("GameEnum");
var BizFunc = require("BizFunc");
var Stage = require("Stage");
var Brave = require("Brave");

var VideoAdData = require("VideoAdData");
// var PlayerController=require("PlayerControll");

window.cc;
window.EventBus = EventBus;
window.Constant = Constant;
window.UIManager = UIManager;
window.LayerManager = LayerManager;
window.ViewManager = ViewManager;
window.BaseWind = BaseWind;
window.WxServer = WxServer;
window.ResourceManager = ResourceManager;

window.GameConstant = GameConstant;
window.GameViewData = GameViewData;
window.GameEnum = GameEnum;
window.Stage = Stage;
window.Brave = Brave;
window.TokenFactory = new TokenFactory();
window.TokenManager = new TokenManager();
window.BizFunc = new BizFunc();
window.StageManager = new StageManager();
window.StaticFunc = new StaticFunc();

// window.PlayerController=PlayerController;

//------------Data-------------//

// var ButtlesCfgData=require("ButtlesCfgData");
// var PlayersCfgData=require("PlayersCfgData");
// var RewardItemCfgData=require("RewardItemCfgData");
// var StarSortCfgData=require("StarSortCfgData");

// var PlayerData=require("PlayerData");
// var RewardItemData=require("RewardItemData");
// var StarSortData=require("StarSortData");
// var ButtleData=require("ButtleData");

// var GameRunData=require("GameRunData");


//------------VoData-------------//

// window.ButtlesCfgVo=require("ButtlesCfgVo");
// window.PlayersCfgVo=require("PlayersCfgVo");
// window.RewardItemCfgVo=require("RewardItemCfgVo");
// window.StarSortCfgVo=require("StarSortCfgVo");
// window.PlayerVoData=require("PlayerVoData");
// window.SortVoData=require("SortVoData");


window.const = {
    Screen_Width: cc.winSize.width,
    Screen_Height: cc.winSize.height,
    Adaptation_Coefficient: cc.winSize.height / 1920,          //适配系数比例
    init() {
        this.Screen_Width = cc.winSize.width;
        this.Screen_Height = cc.winSize.height;
        this.Adaptation_Coefficient = cc.winSize.height / 1920;
        this.wxconst = {
            DEFAULT_PIC: "https://www.lizhaoblog.com/all-res/common/shouquan.png",
            DEFAULT_CENTER_POINT_X: window.const.Screen_Width / 2 * this.Adaptation_Coefficient,
            DEFAULT_CENTER_POINT_Y: window.const.Screen_Height / 2 * this.Adaptation_Coefficient,
            DEFAULT_WIDTH: 240 * this.Adaptation_Coefficient,
            DEFAULT_HEIGHT: 120 * this.Adaptation_Coefficient,

            // DEFAULT_CENTER_POINT_X: window.const.Screen_Width / 2 * this.Adaptation_Coefficient / 4,
            // DEFAULT_CENTER_POINT_Y: window.const.Screen_Height / 2 * this.Adaptation_Coefficient / 4,
            // DEFAULT_WIDTH: 240 * this.Adaptation_Coefficient * 3,
            // DEFAULT_HEIGHT: 120 * this.Adaptation_Coefficient * 3

        }
    },
}

window.cfg = {

    StageCfgData: StageCfgData,
    LandCfgData: LandCfgData,
    init() {
        StageCfgData.init();
        LandCfgData.init();
    },
}

// window.api_base = "http://127.0.0.1:9212";
window.api_base = "https://www.lizhaoblog.com";
window.api_context_path = window.api_base + "/game";
window.api = {};
window.api.SAVE_USER = api_context_path + "/touch/save";

window.common ={};
window.common.wx = {};
window.common.wx.ad = {};
window.common.wx.ad.bannerFirstId = "adunit-3ee40fcf41bce615";
window.common.wx.ad.bannerSecondId = "adunit-ced188505e0c0f7d";
window.common.wx.ad.bannerThirdId = "adunit-98e152c9c04159d1";
window.common.wx.ad.videoFirstId = "adunit-990f448c472d75ee";

window.ad={};
window.ad.bannerFirst = null;
window.ad.bannerSecond = null;
window.ad.bannerThird = null;
window.ad.videoAdData  = VideoAdData;
window.ad.videoFirst = null;
window.ad.videoSecond = null;

window.touchViewData = {}
window.touchViewData.hasFive = false;
